<?php


namespace App\Model\Repository;


use App\Model\Base\ApiCategory;

/**
 * Class ApiCategoryRepository
 * @package App\Model\Repository
 */
class ApiCategoryRepository extends ApiCategory
{
    public static function getCategoryMap()
    {
        return collect(self::all()->toArray())->mapWithKeys(function ($item) {
            return [$item['category_id'] => $item['category_name']];
        })->all();
    }
}